package com.greenline.push.dal.pushcenter.impl;

import com.greenline.push.dal.base.BaseDAO;
import com.greenline.push.dal.pushcenter.DomainAppChannelDAO;
import com.greenline.push.dal.pushcenter.dataobject.DomainAppChannelDO;
import com.greenline.push.dal.query.DomainAppChannelQuery;

public class DomainAppChannelDAOImpl extends BaseDAO implements DomainAppChannelDAO {

    @Override
    public Long insert(DomainAppChannelDO domainAppChannelDO) {
        return (Long) super.getSqlMapClientTemplate().insert("domainAppChannel.insert", domainAppChannelDO);
    }

    @Override
    public DomainAppChannelDO findById(Long id) {
        return (DomainAppChannelDO) super.getSqlMapClientTemplate().queryForObject("domainAppChannel.find_by_id", id);
    }

    @Override
    public int update(DomainAppChannelDO domainAppChannelDO) {
        return super.getSqlMapClientTemplate().update("domainAppChannel.update", domainAppChannelDO);
    }

    @Override
    public DomainAppChannelQuery listByQuery(DomainAppChannelQuery query) {
        return (DomainAppChannelQuery) super.listByQuery("domainAppChannel.list_by_query", query);
    }

    @Override
    public int delete(Long id) {
        return super.getSqlMapClientTemplate().delete("domainAppChannel.delete", id);
    }

}
